using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace MyMvc.Model.Models.Mapping
{
    public class AboutArticleMap : EntityTypeConfiguration<AboutArticle>
    {
        public AboutArticleMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.AboutName)
                .HasMaxLength(128);

            // Table & Column Mappings
            this.ToTable("AboutArticle");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.ArticleID).HasColumnName("ArticleID");
            this.Property(t => t.AboutID).HasColumnName("AboutID");
            this.Property(t => t.AboutName).HasColumnName("AboutName");
        }
    }
}
